/**atoi atol atoll*/
/**strtol strtoll strtoul strtoull*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main()
{
	printf("atoi:%d\n",atoi("500"));
	printf("atol:%ld\n",atol("500"));
	printf("atoll:%lld\n",atoll("500"));

	printf("strtol:%ld\n",strtol("0x500",NULL,16));
	printf("strtol:%ld\n",strtol("0x500",NULL,0));
	printf("strtol:%ld\n",strtol("500",NULL,16));
	printf("strtol:%ld\n",strtol("0777",NULL,8));
	printf("strtol:%ld\n",strtol("0777",NULL,0));
	printf("strtol:%ld\n",strtol("1111",NULL,2));
	printf("strtol:%ld\n",strtol("-1111",NULL,2));

	printf("atof:%lf\n",atof("0.123"));
	printf("atof:%lf\n",atof("-1.1185"));
	printf("atof:%lf\n",atof("100.0123"));

	char str[20]={0};
	sprintf(str,"%d",500);
	puts(str);
	memset(str,0x0,sizeof(str));
	sprintf(str,"%f",500.111);
	puts(str);
	memset(str,0x0,sizeof(str));
	sprintf(str,"%u",500);
	puts(str);

	return 0;
}

